import { BasicColumn, FormSchema } from '/@/components/Table';

/**
 * 定义参数项日志信息表头
 */
export const pointsTableColumns: BasicColumn[] = [
  {
    title: '点号',
    dataIndex: 'pointid',
    fixed: 'left',
    width: 100,
  },
  {
    title: '点号名称',
    dataIndex: 'pointname',
    width: 150,
    ifShow: true,
  },
  {
    title: '时段类型',
    dataIndex: 'tmtype',
    width: 100,
    ifShow: false,
  },
  {
    title: '时段类型',
    dataIndex: 'tmtypestr',
    width: 100,
    ifShow: true,
  },
  {
    title: '排序号',
    dataIndex: 'odr',
    width: 80,
    ifShow: true,
  },
  {
    title: '单元格位置',
    dataIndex: 'loc',
    width: 100,
    ifShow: true,
  },
  {
    title: '数据值单位',
    dataIndex: 'unit',
    width: 100,
    ifShow: true,
  },
  {
    title: '备注',
    dataIndex: 'description',
    ifShow: true,
    // width: 200,
  },

];
/**
 * 定义搜索表单配置*/

export const queryConditionFormSchema: FormSchema[] = [
  {
    field: 'keywords',
    label: '关键字',
    component: 'Input',
    colProps: { span: 6 },
    defaultValue: '',
  },
];

/**
 * 定义新增/修改的项目表单*/
export const pointsFormSchema: FormSchema[] = [
  {
    field: 'pointid',
    label: '点号',
    component: 'Input',
    required: true,
    colProps: { span: 20 },
  },
  {
    field: 'pointname',
    label: '点号名称',
    component: 'Input',
    required: true,
    colProps: { span: 20 },
  },
  {
    field: 'tmtype',
    label: '时段类型',
    component: 'Select',
    required: true,
    colProps: { span: 10 },
    defaultValue: '3',
  },
  {
    field: 'odr',
    label: '排序号',
    component: 'InputNumber',
    required: false,
    colProps: { span: 10 },
    defaultValue: '99',
  },
  {
    field: 'loc',
    label: '单元格位置',
    component: 'Input',
    required: false,
    colProps: { span: 10 },
  },
  {
    field: 'unit',
    label: '数据值单位',
    component: 'Input',
    required: false,
    colProps: { span: 10 },
  },
  {
    field: 'description',
    label: '备注',
    component: 'InputTextArea',
    required: false,
    colProps: { span: 20 },
    componentProps: {
      autoSize: { minRows: 2, maxRows: 6 },
    },
  }
]


